<div class="farm-overhaul-container">
  <aside class="farm-overhaul-aside">
    <!-- <app-turbine-tag-selector [oneFarm]="true" [currentFarmId]="currentFarmId" (turbinesEmit)="onTurbinesEmit($event)">
    </app-turbine-tag-selector> -->
    <app-device-tag-selector fxFlexFill  
        [deviceCategories]="deviceCategory"
        [selectedFarmId]="currentFarmId"         
        [multipleFarm]="false"   
        [choiceDeviceCount]="deviceCountLimit"  
        [includeTagSelector]="false"      
        (selectedDevicesChange)="onSelectedDevicesChange($event)">       
        </app-device-tag-selector>
  </aside>
  <section class="farm-overhaul-main flex flex-column flex-full">
    <header class="overhaul-main-header flex">

      <div class="farms flex-full">
        <span class="farm-name"><i></i> <b>风场：</b> </span>
        <span *ngFor="let item of farms let i =index " [ngClass]="{active:item.farmId == currentFarmId}" (click)="onFarmClick(item)">
            {{item.farmName}}
        </span>

      </div>
      <div class="time-choose">

        开始时间：
        <p-calendar [locale]="en" [(ngModel)]="startDate"></p-calendar>

        结束时间：
        <p-calendar [locale]="en" [(ngModel)]="endDate"></p-calendar>
        <button class="button" (click)="onSearch()">查询</button>
        <button class="button" (click)="onEdit()">编辑</button>
      </div>
    </header>
    <section class="overhaul-main-content flex  flex-column flex-full">
      <header class="main-content-header">
        <span (click)=onClickHeader(0) [ngClass]="{on:active==0}">非计划停机</span>
        <span (click)=onClickHeader(1) [ngClass]="{on:active==1}">计划停机</span>

      </header>
      <section class=" flex-full main-content-list">
          <app-overhaul-table [ngClass]="{'overhaul-table':true,on:active==0}" #overhaultable  (emitSelectHistory)="onSelectHistory($event)" [turboperHistorys]="turboperHistorys"></app-overhaul-table>
          <app-overhaul-table [ngClass]="{'overhaul-table':true,on:active==1}" #overhaultable  (emitSelectHistory)="onSelectHistory($event)" [turboperHistorys]="turboperHistorys2"></app-overhaul-table>
      </section>
      
    </section>
  </section>
</div>
<app-overhaul-edit *ngIf="isEdit" (colseEdit)="onColseEdit($event)" class="farm-overhaul-edit" [currentHistory]="currentHistory"></app-overhaul-edit>

<p-dialog header="提示信息" [(visible)]="display" modal="modal" width="250" [responsive]="true">
  <p>{{mes}}!</p>
  <p-footer>
    <button type="button" pButton icon="fa-check" (click)="display=false" label="确定"></button>
  </p-footer>
</p-dialog>